package com.hwpt.hwaccount.feature.feedback;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

import java.util.List;

public interface FeedbackContract {
    
    interface View {
        void showFeedbackTypeDialog();
        void updateImagePreview();
        void showToast(String message);
        void clearForm();
        void setFeedbackTypeText(String text, int color);
        String getFeedbackType();
        String getDescription();
        String getPhone();
        List<Uri> getSelectedImages();
        void onImageSelectionResult(int requestCode, int resultCode, Intent data);
    }
    
    interface Presenter {
        void attachView(View view);
        void detachView();
        void onFeedbackTypeClicked();
        void onAddImageClicked();
        void onImageSelected(int requestCode, int resultCode, Intent data);
        void onSubmitClicked();
        void onDescriptionChanged(CharSequence s, int start, int before, int count);
        List<FeedbackModel.FeedbackType> getFeedbackTypes();
    }
    
    interface Model {
        List<FeedbackModel.FeedbackType> loadFeedbackTypes();
        boolean validateFeedback(String type, String description);
        void submitFeedback(String type, String description, String phone, List<Uri> images, OnSubmitCallback callback);
        
        interface OnSubmitCallback {
            void onSuccess();
            void onSuccess(List<String> imageUrls); // 修改为支持返回URL列表
            void onError(String message);
        }
    }
}